<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="commontaglib"%>
<%
String path = request.getContextPath();

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
 
<html>
  <head>
    <link rel="stylesheet" href="<%=path%>/css/innerstyle.css" type="text/css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<%=path%>/css/cupertino/jquery-ui.custom.min.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<%=path%>/css/ui.jqgrid.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<%=path%>/css/ui.multiselect.css" />    
    <script type="text/javascript" src="<%=path%>/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="<%=path%>/js/jquery-ui-1.8.23.custom.min.js"></script>     
    <script type="text/javascript" src="<%=path%>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>   
	<script type="text/javascript" src="<%=path%>/js/jquery.validate.js"></script>
	<script type="text/javascript" src="<%=path%>/js/jquery.metadata.js"></script>	
	<script type="text/javascript" src="<%=path%>/js/messages_zh.js"></script>
    <script type="text/javascript">
    
    $(function(){ 
        $("#but1").button();
        $("#but2").button();
        $("#but3").button();
        $( "#datepicker" ).datepicker($.datepicker.regional[ "zh-CN" ]);
        $( "#datepicker1" ).datepicker($.datepicker.regional[ "zh-CN" ]);
        //var json = eval('(' + djtk + ')');  
        //alert(${djtk}) ;             
          //         for(var i=0;i<json.length;i++){                       
         //               httk+=json[i].biaot+":"+json[i].neir+"<br/>"; 
         //          } 
        
       //loadHtData();
    });
    

function loadHtData(){
    var url = "<%=path%>/htgl/findHtxxToIndexList.action";    
      $.post(url,function(data){ 
        var projects = eval('(' + data + ')'); 
        //alert(projects);
       $( "#htbh").autocomplete({
			minLength: 0,
			source:projects,			
            select: function( event, ui ) {
            var htbh = ui.item.htbh; 
            url = "<%=path%>/htgl/findHttkToIndexList.action?htbh="+htbh;	
                $.post(url,function(data){
                var httk="";
                var json = eval('(' + data + ')');                
                   for(var i=0;i<json.length;i++){                       
                        httk+=json[i].biaot+":"+json[i].neir+"<br/>"; 
                   } 
                //alert(httk);  
                $("#httk").html(httk);							
				$("#hetbh").val(htbh); 
				$("#htbh").val(ui.item.htlrbh);                                    
                });         
										
				return false;

			}
		});
    });
    }
    
   function tj(){		  
   
   $("#form1").validate({
	       rules: {
	       //"ht.hetlrbh": "required",
	       "bcxy.bucxykssj":"required",
	       //"ht.yingyzhmjglzbm":"required",
	       "bcxy.bucxyjssj":"required",
	       
	       },
		   messages: {
		   "bcxy.bucxykssj":"请输入补充协议开始时间",
		   //"ht.hetlrbh":"请输入合同号",
		   "bcxy.bucxyjssj":"请输入补充协议结束时间",
		  
	       }	   
		   
		   }
		   );
   
	   $( "#dialog-confirm" ).dialog({                       
			resizable: false,
			height:140,
			modal: true,
			buttons: {
				"确认": function() {   
					document.form1.action="<%=path%>/htgl/saveHtbcxyInfo.action";
					document.form1.method="post";
					document.form1.submit();					                   										
				},
				"返回": function() {				    			    
					$( this ).dialog( "close" );
				}
			} 
		});
	 
	 return false;
	} 
    

</script>
    
  </head>
 <body>
<div id="best1">
<h2><span>补充条款录入</span></h2>
<form name="form1">
<table id="list_search" cellpadding="0" cellspacing="0" border="0" class="content_gridview">
       <tr><td>
       
       <table cellpadding="0" cellspacing="0" border="0" class="content_gridview">
       <tr>          
            <td> 
                                      合同编号: 
            </td>
            <td style="text-align:left">
            	<input id="htbh"  type="text" class="longtextbox"  value="${bcxy.hetbh}"/>
            	<input id="hetbh" type="hidden" name="bcxy.hetbh"/>
            </td> 
        </tr>
       <tr>
        <td>合同条款:</td>
        <td style="text-align:left">
        	<div id="httk">${fileName}</div>
        </td>
        </tr>
       </table>
       
       </td>
       </tr>
		<tr>
        	<td>
        	<table id="tab1" cellpadding="0" cellspacing="0" border="0" class="content_gridview">
        	
        	
        	<tr>
        	<td>
        	<span id="">补充条款一.</span>
        	</td>
        	<td>
        	<textarea cols="90" rows="5" class="textarea" >${bcxy.buc1}</textarea>
        	</td>
        	</tr>
        	
        	<tr>
        	<td>
        	<span id="">补充条款二.</span>
        	</td>
        	<td>
        	<textarea cols="90" rows="5" class="textarea" >${bcxy.buc2}</textarea>
        	</td>
        	</tr>
        	
        	<tr>
        	<td>
        	<span id="">补充条款三.</span>
        	</td>
        	<td>
        	<textarea cols="90" rows="5" class="textarea" >${bcxy.buc3}</textarea>
        	</td>
        	</tr>
        	
        	<tr>
        	<td>
        	<span id="">补充条款四.</span>
        	</td>
        	<td>
        	<textarea cols="90" rows="5" class="textarea" >${bcxy.buc4}</textarea>
        	</td>
        	</tr>
        	
        	<tr>
        	<td>
        	<span id="">补充条款五.</span>
        	</td>
        	<td>
        	<textarea cols="90" rows="5" class="textarea" >${bcxy.buc5}</textarea>
        	</td>
        	</tr>
        	
        	<tr>
        	<td>
        	<span id="">补充条款六.</span>
        	</td>
        	<td>
        	<textarea cols="90" rows="5" class="textarea" >${bcxy.buc6}</textarea>
        	</td>
        	</tr>
        	
        	<tr>
        	<td>
        	<span id="">补充条款七.</span>
        	</td>
        	<td>
        	<textarea cols="90" rows="5" class="textarea" >${bcxy.buc7}</textarea>
        	</td>
        	</tr>
        	
        	<tr>
        	<td>
        	<span id="">补充条款八.</span>
        	</td>
        	<td>
        	<textarea cols="90" rows="5" class="textarea" >${bcxy.buc8}</textarea>
        	</td>
        	</tr>
        	<tr>
        	<td colspan="2" style="text-align:left">&nbsp;&nbsp;&nbsp;&nbsp;补充协议开始时间：<input id="datepicker" type="text" class="textbox" value="${bcxy.bucxykssj}" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;补充协议结束时间：<input id="datepicker1" type="text" class="textbox" value="${bcxy.bucxyjssj}" /></td>
        	
        	</tr>
        	
        	</table>
       
        	</td>
        </tr>
       
        <tr>
		    <td colspan="4" align="center">		    
		    <input id="but1" type="hidden" name="" value="确认" onclick="tj();"/>		    
		    &nbsp;&nbsp;&nbsp;<input id="but2" type="hidden" name="" value="重置" />&nbsp;&nbsp;&nbsp;
		    <input id="but3" type="button" name="" value="关闭" onclick="window.returnValue=1;window.close();"/></td>
            
        </tr>
  </table> 
</form>
</div> 

<div id="dialog-confirm" title="是否确认提交？"></div>
</body>
</html>
